A garbage-cleaning robot is a household electric appliance having certain level of artificial intelligence to automatically clean, e.g., the floor in a room. Conventionally, the garbage-cleaning robot works by user appointment. That is, the user sets a designated cleaning time, usually a time when the user is not at home, for the garbage-cleaning robot to clean the floor. However, such user-appointed method has a low cleaning efficiency. For example, the garbage-cleaning robot may not timely respond to newly generated garbage. Moreover, the garbage-cleaning robot may have to travel the entire room to locate the garbage.